Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrum/atlas v1.1 #445

Open
wants to merge 103 commits into
base: arbitrum/atlas-v1.0
Choose a base branch
from
Open

Conversation

BenSparksCode
Copy link
Contributor

@BenSparksCode BenSparksCode commented Oct 24, 2024

Changes:

  • Brings Atlas v1.1 updates as detailed in feat: Atlas v1.1 #428 to our custom Arbitrum version of Atlas
  • Brings size cuts as detailed in refactor: contract size cuts #444 to our custom Arbitrum version of Atlas
  • Minor tweaks to Atlas and L2 Gas Calculator deploy scripts to be more generic across all chains
  • Detect if chain is Arbitrum Nova in the constructor of ArbitrumGasCalculator.

Atlas contract size is 24,424 bytes (152 bytes below limit) and is thus deployable on Arbitrum.

BenSparksCode and others added 30 commits September 4, 2024 17:28
@BenSparksCode BenSparksCode marked this pull request as ready for review October 24, 2024 13:20
Copy link
Contributor

@0x1NotMe 0x1NotMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The changes in the AtlasConstants.sol I assume are intentional?
_LOCK_PHASE_MASK from bytes32 to uint256

@BenSparksCode
Copy link
Contributor Author

The changes in the AtlasConstants.sol I assume are intentional? _LOCK_PHASE_MASK from bytes32 to uint256

Yes. Before we had to convert everything to/from bytes32 to use transient storage. Now with the transient keyword it will handle those conversions to our variable types, so using uint256 here cuts out 1 manual conversion step in our source code every time we use the variable.

Copy link
Contributor

@thogard785 thogard785 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - just one minor thing i noticed.

@@ -92,12 +102,13 @@ abstract contract Escrow is AtlETH {
{
bool _success;
bytes memory _data;
uint256 _gasLimit = userOp.gas > gasleft() ? gasleft() : userOp.gas;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be an offset to allow graceful returns if we run out of gas? plus the issue about the call forcing 63/64? We may want to do gasleft() * 63 / 64 - gracefulReturnOffset', where gracefulReturnOffset` is enough to store what we need and return the correct atlas-formatted error. (50k?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good call, will add that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR here: #446

Will merge that into Atlas v1.1 and then update this Arbitrum version with the changes if PR is accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants